package com.tanguy.user

/**
 * Created by dab on 2017/9/27 0027 16:05
 */

object Const {
    object Api {
        /**
         *  是否外网 true 外网
         */
        val isExtranet = false
        val SOCKET_SERVER = if (isExtranet) "www.mdchuxing.com" else "192.168.3.228"
        val BASE_URL = if (isExtranet) "http://www.mdchuxing.com/" else "http://192.168.3.228:8080/donLi/"
        val BASE_URL1 = if (isExtranet) "http://www.mdchuxing.com/" else "http://192.168.3.228:8080/donLi"
        val SOCKET_PORT = 8066
        //高德web端url
        val GAODE_URL = "http://restapi.amap.com/v3/"
    }

    //key
    object KEY {
        //高德地图web端key
        val GAODE_WEB_KEY = "76fa6e402632f1fbf8ae27c579b21c95"
        //阿里云
        val OSS_AK = "ht8L1fbbPdlMGkbT"
        val OSS_AKS = "QE9dutDJlVKPGKoQkxTewCCgM8WCfV"
        val OSS_END_POINT = "http://oss-cn-shenzhen.aliyuncs.com"
        val BUCKET_NAME = "xld-test"
        //微信支付
        val WECHAT_APP_ID = "xld-test"

    }

    //h5页面
    object AppText {
        const val debug = true
        const val BAIDU = "http://www.baidu.com"
        private const val SERVER = "127.0.0.1:8080"
        private const val BASE_URL = "$SERVER/donLi/sys/apptext/getAppText?type="
        //推荐有礼奖励规则
        val REWARD_RULES = if (debug) BAIDU else BASE_URL + 0
        //充值返现协议
        val RECHARGE_REWARD_RULES = if (debug) BAIDU else BASE_URL + 5
        //平台协议
        val PLATFORM_AGREEMENT = if (debug) BAIDU else BASE_URL + 1
        //关于我们
        val ABOUT_US = if (debug) BAIDU else BASE_URL + 3
    }

    object DEBUG {
        //所有的日志
        val All = BuildConfig.DEBUG
        //响应的日志
        const val RESPONSE = true
        //请求的日志
        const val REQUEST = true

    }

    object User {
        const val ID = "ID"//id
        const val PHONE = "phone"//PHONE
    }

    object SocketType {
        const val INTERVAL = 1000 * 30L//心跳间隔
        const val OK = "OK"//心跳
        const val USER_LOGIN = "USER_LOGIN"//单点登陆被挤推送标识
        const val USER_ORDER_PAY = "USER_ORDER_PAY"//用户支付宝或微信支付成功 推给用户的
        const val USER_ORDER_GRAB = "USER_ORDER_GRAB"//司机接单 推给用户的
        const val USER_ORDER_SETOF = "USER_ORDER_SETOF "//  司机出发前往预约地点 推给用户的
        const val USER_ORDER_ARRIVE = "USER_ORDER_ARRIVE"//   司机到达预约地点 推给用户的
        const val USER_ORDER_BEGIN = "USER_ORDER_BEGIN "//  司机开始服务 推给用户的
        const val USER_ORDER_ORVER = "USER_ORDER_ORVER "//  司机送达乘客 推给用户的
    }

    object RxType {
        const val ORDER_PAY = "ORDER_PAY"//用户支付宝或微信支付成功 推给用户的
        const val ORDER_GRAB = "ORDER_GRAB"//司机接单 推给用户的
//        const val USER_ORDER_SETOF = "USER_ORDER_SETOF"//司机接单 推给用户的
        const val USER_ORDER_STATE = "USER_ORDER_STATE"//订单状态改变,更新订单显示
    }

    object IntentCode {
        //Intent传值
        val PHONE = "phone"
        val VEHICLE_TYPE = "vehicle_type"//车型ID
        val VEHICLE_STRING = "vehicle_type_string"//车型的字符串
        val CITY_PROVINCE_STRING = "city_province_string"//城市的全称字符串
        val CITY_STRING = "city_string"//城市的字符串
        val VERIFY_PHONE = "city_string"//验证手机的方式

        val STREET_NUMBER = "street_number"//选择详细地址
        val SHOW_NAME = "show_name"//选择显示的详细地址
        val LONGITUDE = "LONGITUDE" //进度
        val LATITUDE = "LATITUDE" //纬度

        val CAR_LIST = "car" //车型
        val SITE_BEAN = "site_bean" //站台信息
        val CITY_BEAN = "city_bean" //城市对象

        val CITY_NAME = "city_name" //城市名字
        val CITY_CODE = "city_code" //城市代码 028
        val CITY_ID = "city_id" //城市id

    }

    object RequestCode {
        //RequestCode
        val FLIGHT_NUMBER = 0x60//航班号
        val LOGIN_REQUEST = 0x61//登录
        val IMAGE_PORTRAIT = 0x62//头像图片
        val IMAGE_CROP_PORTRAIT = 0x63//裁剪头像图片
        //司机注册
        val DRIVING_LICENCE = 0x6001//驾驶证
        val DRIVING_LICENSE = 0x6002//行驶证
        val CAR_INSURANCE = 0x6003//车险
        val GROUP_PHOTO = 0x6004//人车合影
        val VEHICLE_TYPE = 0x6005//车型

        //酒店注册
        val REGION_TYPE = 0x7001//开通地区
        val IMG_SHOW = 0x7002//展示图
        val IMG_BUSIN = 0x7003//营业执照
        val IMG_SPECIAL = 0x7004//特种行业许可证
        val IMG_HEALTH = 0x7005//卫生许可证
        val IMG_FIRE = 0x7006//消防安全许可证
        val HOTEL_ADDRESS = 0x7007//酒店详细地址
        val TRIP_ADDRESS = 0x7008//接送机站详细地址
        val UP_USER = 0x8000//修改了用户信息
        val SEARCH_LOCATION = 0x9000 //搜索详细地址

        val SELECT_STATION_START = 0x1000 //选择站点,开始
        val SERVICE_CITY = 0x1001 //服务城市
        val SELECT_USER = 0x1002//选择他人乘车


        val WAIT_DRIVER = 0x1003//选择他人乘车
    }

}
